The recent use of MySQL database has encountered several types of numbers, mainly int,bigint,smallint and tinyint. One of the more confusing is the difference between int and smallint. Today on the Internet to find out carefully, find the following
bigintInteger data (all numbers) from -2^63 (-9223372036854775808) to 2^63-1 (9223372036854775807). The storage size is 8 bytes.p.s. bigint already has length, in MySQL build table length, just used to display the number of digitsIntInteger data
int: An int type of 4 bytes in SQL with a length of 1 represents the length of an int type
Symbol-Differentiated range: 2147483647~-2147483648
VARCHAR: A varchar type can contain a number, letter, kanji, such as a field of length 15 can hold 15
An analysis of C-language variable-length arrays
1. Introduction
We know that unlike modern programming languages such as C + +, the traditional C language does not support variable-length array functions, which means that the length of the array
In the _c++ primer_ dynamic array, it is legal to allocate an empty array dynamically.size_t n = get_size();int* p = new int[n];for(int* q = p; q != p + n; ++q)char arr[0];//错误char cp = new char[0];When we use new to allocate an array of size 0, new
An analysis of C-language variable-length arrays
1. Introduction
We know that unlike modern programming languages such as C + +, the traditional C language does not support variable-length array functions, which means that the length of the array
1: "Byte" is byte, "bit" is bit;2:1 byte = 8 bit;Char is 2 bytes in Java. Java uses unicode,2 bytes (16 bits) to represent one character.ButString str = "compilation";byte[] bytes = Str.getbytes (); I wonder why it takes 3 bytes here?3 byte is 3*8=24
Explanation of length value of MySQL int typeMySQL when building a table the length of the int type represents what is the maximum width that the column allows to store the value? Why do I set an int (1) to save 10,100,1000 as well?While I knew Int (
Introduced:What do the numbers in int (5) and char (5) or varchar (5) mean? Is the number of bytes, or the length of the character? Why is an int (5) specified in an integral type, but you can enter 123456?The answer is the latter, whether it is an
Consider one of the following questions before starting this article
How do I get the length of an array without using the IDE with automatic completion? And, how do I get the length of a string?
This question I have asked different levels of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.